<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title> JavaScript 打印金字塔</title>
		<style>
			*{
				font-family: "Batang";
			}
		</style>
	</head>
	<body>
		
		<script>
			
			
			//.金字塔
			//用几个空格
			//有几个*
			//且依次向下倒数
			for(var i = 0; i <=10; i++){
				for(var n= 60; n>= i; n--){
					document.write("&nbsp;");
				}
				for(var j = 0; j<= i*2; j++){
						document.write("*");
					}
				document.write("<br>");
			}
			
			
		</script>
		
	</body>
</html>
